package JavaSe;

/**
 * @author VX5
 * @Title: MJC
 * @ProjectName DataStructure
 * @Description: TODO
 * @date ${DAT}20:44
 */
public class Base {
//    public void methodOne(){
//        System.out.println("A");
//        methodTwo();
//    }
//    public void methodTwo(){
//        System.out.println("B");
//    }
//
//    public static class Derived extends Base{
//        public void methodOne(){
//            super.methodOne();
//            System.out.println("C");
//        }
//        public void methodTwo(){
//            super.methodTwo();
//            System.out.println("D");
//        }
//    }
    public Base(){
        System.out.println("调用父方法");
        g();
    }
    void g(){
        System.out.println("F g");
    }

    static class B extends Base{
        public void g(){
            System.out.println("Derived g()");
        }
    }
    public static void main(String[] args) {
        Base b = new B();
        b.g();
    }
}
